package com.microservice.salmon.oauth.service.rbac;

import com.microservice.salmon.db.entities.ShopMenu;
import com.microservice.salmon.db.entities.ShopRole;
import com.microservice.salmon.db.entities.ShopUser;
import com.salmon.common.tree.ITree;

import java.util.List;

/**
 * <p>
 * 店铺相关的RBAC模型服务
 * </p>
 *
 * @author 王洪庆 2019-01-13 15:04
 */
public interface ShopRbacService {

    ShopUser obtainShopUser(String loginName);

    ShopRole obtainShopRoleByRoleId(Integer roleId);

    /**
     * 返回用户对应的菜单值
     * @param roleId 角色ID
     * @param shopId 店铺ID
     * @return
     */
    List<ShopMenu> obtainShopMenu(Integer roleId, Integer shopId);

    List<ITree> obtainTreeMenu(Integer roleId, Integer shopId);
}
